﻿@model OrderSettingsModel
@using Telerik.Web.Mvc.UI;
@using Nop.Core.Domain.Orders;
@using (Html.BeginForm())
{
    <div class="section-header">
        <div class="title">
            <img src="@Url.Content("~/Administration/Content/images/ico-configuration.png")" alt="" />
            @T("Admin.Configuration.Settings.Order")
        </div>
        <div class="options">
            <button type="submit" name="save" value="save" class="t-button">@T("Admin.Common.Save")</button>
        </div>
    </div>
    @Html.ValidationSummary(false)

    
     
    @Html.Telerik().TabStrip().Name("customersettings-edit").Items(x =>
{
    x.Add().Text(T("Admin.Configuration.Settings.Order.OrderSettings").Text).Content(TabOrderSettings().ToHtmlString()).Selected(true);
    x.Add().Text(T("Admin.Configuration.Settings.Order.ReturnRequestSettings").Text).Content(TabReturnRequestSettings().ToHtmlString());
})
}
@helper TabOrderSettings()
    {
    <table class="adminContent">
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.IsReOrderAllowed):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.IsReOrderAllowed)
                @Html.ValidationMessageFor(model => model.IsReOrderAllowed)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.MinOrderSubtotalAmount):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.MinOrderSubtotalAmount)
                @Html.ValidationMessageFor(model => model.MinOrderSubtotalAmount) @Model.PrimaryStoreCurrencyCode
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.MinOrderTotalAmount):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.MinOrderTotalAmount)
                @Html.ValidationMessageFor(model => model.MinOrderTotalAmount) @Model.PrimaryStoreCurrencyCode
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.AnonymousCheckoutAllowed):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AnonymousCheckoutAllowed)
                @Html.ValidationMessageFor(model => model.AnonymousCheckoutAllowed)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.TermsOfServiceEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.TermsOfServiceEnabled)
                @Html.ValidationMessageFor(model => model.TermsOfServiceEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.OnePageCheckoutEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.OnePageCheckoutEnabled)
                @Html.ValidationMessageFor(model => model.OnePageCheckoutEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.GiftCards_Activated_OrderStatusId):
            </td>
            <td class="adminData">
                @Html.DropDownListFor(model => model.GiftCards_Activated_OrderStatusId, Model.GiftCards_Activated_OrderStatuses)
                @Html.ValidationMessageFor(model => model.GiftCards_Activated_OrderStatusId)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.GiftCards_Deactivated_OrderStatusId):
            </td>
            <td class="adminData">
                @Html.DropDownListFor(model => model.GiftCards_Deactivated_OrderStatusId, Model.GiftCards_Deactivated_OrderStatuses)
                @Html.ValidationMessageFor(model => model.GiftCards_Deactivated_OrderStatusId)
            </td>
        </tr>
    </table>
}
@helper TabReturnRequestSettings()
    {
    <table class="adminContent">
        <tr>
            <td class="adminTitle" colspan="2">
                @T("Admin.Configuration.Settings.Order.ReturnRequestsDescription1")
                <br />
                <br />
                @T("Admin.Configuration.Settings.Order.ReturnRequestsDescription2")
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ReturnRequestsEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ReturnRequestsEnabled)
                @Html.ValidationMessageFor(model => model.ReturnRequestsEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.NumberOfDaysReturnRequestAvailable):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.NumberOfDaysReturnRequestAvailable)
                @Html.ValidationMessageFor(model => model.NumberOfDaysReturnRequestAvailable)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ReturnRequestReasonsParsed):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ReturnRequestReasonsParsed)
                @Html.ValidationMessageFor(model => model.ReturnRequestReasonsParsed)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ReturnRequestActionsParsed):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ReturnRequestActionsParsed)
                @Html.ValidationMessageFor(model => model.ReturnRequestActionsParsed)
            </td>
        </tr>
    </table>
}